<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd">
  <namespaces>
    <Namespace>
      <prefix>st_${GML_PREFIX}</prefix>
      <uri>http://www.stations_${GML_PREFIX}.org/1.0</uri>
    </Namespace>
    <Namespace>
      <prefix>ms_${GML_PREFIX}</prefix>
      <uri>http://www.measurements_${GML_PREFIX}.org/1.0</uri>
    </Namespace>
  </namespaces>
  <sourceDataStores>
    <DataStore>
      <id>stations_${GML_PREFIX}</id>
      <parameters>
        <Parameter>
          <name>directory</name>
          <value>file:./</value>
        </Parameter>
      </parameters>
    </DataStore>
  </sourceDataStores>
  <targetTypes>
    <FeatureType>
      <schemaUri>stations_${GML_PREFIX}.xsd</schemaUri>
    </FeatureType>
  </targetTypes>
  <includedTypes>
    <Include>measurements2_${GML_PREFIX}.xml</Include>
  </includedTypes>
  <typeMappings>
    <FeatureTypeMapping>
      <sourceDataStore>stations_${GML_PREFIX}</sourceDataStore>
      <sourceType>stations_${GML_PREFIX}</sourceType>
      <targetElement>st_${GML_PREFIX}:Station_${GML_PREFIX}</targetElement>
      <mappingName>isolated_${USE_CASE}_station_${GML_PREFIX}</mappingName>
      <attributeMappings>
        <AttributeMapping>
          <targetAttribute>st_${GML_PREFIX}:Station_${GML_PREFIX}</targetAttribute>
          <idExpression>
            <OCQL>ID</OCQL>
          </idExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>st_${GML_PREFIX}:name</targetAttribute>
          <sourceExpression>
            <OCQL>strConCat('isolated_${USE_CASE}_', NAME)</OCQL>
          </sourceExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>st_${GML_PREFIX}:location</targetAttribute>
          <sourceExpression>
            <OCQL>LOCATION</OCQL>
          </sourceExpression>
        </AttributeMapping>
        <AttributeMapping>
          <targetAttribute>st_${GML_PREFIX}:measurements</targetAttribute>
          <sourceExpression>
            <OCQL>ID</OCQL>
            <linkElement>isolated_${USE_CASE}_measurement_${GML_PREFIX}</linkElement>
            <linkField>FEATURE_LINK[1]</linkField>
          </sourceExpression>
        </AttributeMapping>
      </attributeMappings>
    </FeatureTypeMapping>
  </typeMappings>
</as:AppSchemaDataAccess>
